<!--做题页面-词汇 type=1 表格-->

<link rel="stylesheet" href="https://file.viplgw.cn/ui/thinku-ielts-new/css/evaluation/question.css">
<script src="/cn/js/jquery-1.12.2.min.js"></script>
<div class="head">
    <input id="startTime" value="" type="hidden">
    <input id="maxtime" value="<?php echo $totalTime?>" type="hidden">
    <input type="hidden" value="<?php echo isset($_GET['subjectId']) ? $_GET['subjectId'] : 1 ?>" id="subjectId">
    <input type="hidden" value="<?php echo isset($_GET['pubId']) ? $_GET['pubId'] : 1 ?>" id="pubId">
    <input type="hidden" value="<?php echo $nextSubject!=false ? $nextSubject : 0 ?>" id="nextSubjectId">
    <input type="hidden" value="<?php echo $cateData['type'] ?>" id="type">
    <div class="container">
        <p class="headTitle">申友雅思-<?php echo $cateData['pidName']?>测评-<?php echo $cateData['name']?></p>
        <p class="timeStr"><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/result/cuttime.png"><span></span></p>
        <p  class="quiteBtn" onclick="quite()"><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/result/quite.png">Quit</p>
    </div>
</div>
<div class="container main">
    <?php if($list[0]['parent']['question']){?>
    <div class="section directions_box"> <!--词汇题、翻译题、口语-->
        <?php echo $list[0]['parent']['question'] ?>

    </div>
    <?php }?>
    <div class="section question_box">
        <p class="section_title">Questions:</p>
        <!--        词汇题-->
        <div class="vocabulary_tables">
            <table class="vocabulary_table">
                <thead>
                <tr>
                    <th>NO.</th>
                    <th>Words</th>
                    <th>Explanations</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach ($list[0]['son'] as $k => $v) {
                    if ($k < ceil(count($list[0]['son']) / 2)) {
                        ?>
                        <tr>
                            <th><?php echo $v['name'] ?></th>
                            <th><?php echo $v['article'] ?></th>
                            <th><input placeholder=""
                                       oninput="vocabulary(this,<?php echo $v['id'] ?>,&apos;<?php echo $v['answer'] ?>&apos;)">
                            </th>
                        </tr>
                    <?php }
                } ?>

                </tbody>
            </table>
            <table class="vocabulary_table">
                <thead>
                <tr>
                    <th>NO.</th>
                    <th>Words</th>
                    <th>Explanations</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach ($list[0]['son'] as $k => $v) {
                    if ($k > ceil(count($list[0]['son']) / 2) - 1) {
                        ?>
                        <tr>
                            <th><?php echo $v['name'] ?></th>
                            <th><?php echo $v['article'] ?></th>
                            <th><input placeholder="" name=""
                                       oninput="vocabulary(this,<?php echo $v['id'] ?>,&apos;<?php echo $v['answer'] ?>&apos;)">
                            </th>
                        </tr>
                    <?php }
                } ?>
                </tbody>
            </table>
        </div>


        <p class="next_btn">
            <button class="" onclick="saveAnswer()">Next ></button>
        </p>
    </div>
</div>
<div class="next_modal question_modal" style="display: none">
    <div class="modal_dialog">
        <div class="modal-title">
            Response Required
            <img onclick="closeModal(this)" src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/close.png">
        </div>
        <div class="modal-body">
            <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/warning.png">

            <p>要先选择答案才能继续下一题哦</p>
        </div>
        <div class="modal-footer">
            <button class="nextBtn" onclick="closeModal(this)">OK</button>
        </div>
    </div>
</div>
<div class="next_modal  Quite_modal" style="display: none">
    <div class="modal_dialog">
        <div class="modal-title">
            Quite
            <img onclick="closeModal(this)" src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/close.png">
        </div>
        <div class="modal-body">
            <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/warning.png">

            <p>是否确定退出，退出将不保留测评记录</p>
        </div>
        <div class="modal-footer">
            <button class="noBtn" onclick="closeModal(this)">No</button>
            <button class="yesBtn" onclick="pageBack()">Yes</button>
        </div>
    </div>
</div>
<script src="/cn/js/evaluation/public.js"></script>
<script>
    var dirHei = $('.directions_box').height();
    console.log('dirHei', dirHei)
    var quesHei = "calc(100% - " + dirHei + "px - 50px)";
    var tableHei = "calc(100% -  100px)";
    $('.question_box').css({'height': quesHei});
    $('.vocabulary_tables').css({'height': tableHei})
    var startTime = Math.ceil(new Date().getTime() / 1000); //单位秒
    $('#startTime').val(startTime);
    cutTime();

</script>

